<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>English Audio To Spell</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f9f9f9;
            padding: 20px;
            text-align: center;
        }
        .button-container {
            display: flex;
            justify-content: center; /* Center the buttons */
            align-items: center;
            margin: 10px 0;
        }
        .spacer {
            flex-grow: 1;
        }
        button {
            background-color: #4CAF50;
            border: none;
            color: white;
            padding: 12px 20px;
            text-align: center;
            text-decoration: none;
            font-size: 16px;
            margin: 4px;
            cursor: pointer;
            border-radius: 4px;
            width: 157px; /* Fixed width for buttons */
        }
        #userInput {
            padding: 10px;
            font-size: 16px;
            border-radius: 4px;
            border: 1px solid #ccc;
            width: 300px; /* Fixed width for input field */
            margin: 4px;
        }
        #result, #details {
            margin-top: 20px;
        }
        .fixed-bottom-container {
            position: fixed; /* Make the container fixed */
            bottom: 0; /* Position it at the bottom */
            left: 0;
            width: 100%; /* Stretch across the width of the window */
            background-color: #f9f9f9; /* Match the background color of the body */
            box-shadow: 0 -2px 4px rgba(0,0,0,0.1); /* Optional: Adds a subtle shadow for better separation */
            padding: 10px 0; /* Add some padding */
        }
    
        .counter-button-spacing {
            margin-left: 20px; /* Increase the space between the counter and the button */
        }
    </style>
    <script src="static/script.js"></script>
</head>
<body>
    <!-- <h1>Learn English</h1> -->
    <h1>&nbsp;</h1>
    <div class="button-container">
        <button onclick="playWord()">Play</button>
        <input id="userInput" type="text" placeholder="Type the word here" onkeydown="checkEnter(event)">
        <button onclick="submitWord()">Submit</button>
    </div>
    <div class="button-container">
        <button onclick="showWord()">Show</button>
        
        <button onclick="showPronunciation()">Pronunciation</button>
        <button onclick="showExplanation()">Explanation</button>
        <button onclick="nextWord()">Next</button>
    </div>
    <div id="result"></div>
    <div id="details"></div>
    
    <div class="button-container fixed-bottom-container">
        <span>Counter: <span id="counter">0</span></span>
        <button class="counter-button-spacing" onclick="resetCounter()">Reset Counter</button>
    </div>    

</body>
</html>
